#ifndef CAMERA_H_
#define CAMERA_H_
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include <GL/gl.h>
#include <stdlib.h>
#include <cmath>
#include <math.h>
#include <iostream>
#include "BaseRenderObject.h"
#include "math/GeoMath.h"
#include "math/Vector2.h"
#include "math/Matrix2.h"
#include "math/Vector3.h"
#include "math/Matrix3.h"
#include "IMovingSphere.h"
#include "CollisionManager.h"
/*
*	___ Camera Header___
*
*

***************************************************************/
class Camera : public BaseRenderObject, public IMovingSphere
{
	private:
		Vector3		_pos;
		Vector3 	_dirDelta;
		Vector3 	_offset;
		float		_speed;
		float		_rotThrottle;
		bool		_fly;
		float		_horizontalAngle , _verticalAngle;
		float 		_collisionSphereRadius;
		float		_gravitationalPull;

		void ComputeRotations();

	public:
		Camera(CollisionManager *cm );

		bool isFlyMode();

		void setFlyMode(bool fly);

		Vector3 getPosition();
		Vector3 getPos();// from base class implemented

		Vector3 getOffset();
		void setOffset(Vector3 offs);// from base class implemented

		Vector3 getDirection();
		Vector3 getDir();// from base class implemented

		float getRadius();// from base class implemented

		void setRadius(float r);// from base class implemented

		void setPosition(const Vector3& pos);

		float getHorizontalAngle();

		float getVerticalAngle();

		void setMoveSpeed( float speed );

		float getMoveSpeed( );

		void setRotThrottle( float speed );

		float getRotThrottle( );

		void setHeight(float height);

		void GO_FORWARD();
		void GO_FORWARD_LEFT();
		void GO_FORWARD_RIGHT();
		void GO_BACKWARD();
		void GO_BACKWARD_LEFT();
		void GO_BACKWARD_RIGHT();
		void STRAFE_LEFT();
		void STRAFE_RIGHT();

		void ROT_LEFT(float faktor);
		void ROT_RIGHT(float faktor);
		void ROT_UP(float faktor);
		void ROT_DOWN(float faktor);



		//render implementations
		void RenderObject();
};
/***************************************************************/
#endif
